Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

197
Visualizações
What's the "context" in "TypeError ... cannot be accessed in this context"?

In trying to solve my own problem that I asked about over here, I added some console debugging statements:

return ( 
  <Controller
    control={control}
    name={name}
    key={headline + '_' + name + '_' + i}
    defaultValue=''
    render={({ field, formState, fieldState }) => { 
      console.log('field is');
      console.dir(field, { depth: null});
      console.log('formState is');
      console.dir(formState, { depth: null});
      console.log('fieldState is');
      console.dir(fieldState, { depth: null});
      return React.cloneElement(item.component, { 
        inputRef: field.ref,
        error: !!fieldState.error,
        helperText: fieldState.error?.message,
        FormHelperTextProps: { error: true } 
      })
    }}
  />
);

If I drill into what that outputs, I see

[Log] field is (src_Login_js.chunk.js, line 395)
[Log] Object (src_Login_js.chunk.js, line 396)
  name: "username"
  onBlur: function()
  onChange: function()
  ref: function()
    arguments: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context.
    caller: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context.
    length: 1
    name: ""
    Function Prototype
  value: ""

What I want to know is, does the context refer to my console.logs, or is that an actual error in the render props which I should further investigate?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda